-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
support local compilation cache in disc backend #20
base: acc
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add some ut for this pr to check if the caching works
for (auto device : computation->devices()) { | ||
result_pb.add_devices(device); | ||
} | ||
return hlo_proto.SerializeAsString() + ":::" + result_pb.SerializeAsString(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we could use absl::strcat to concat the strings.
@@ -98,7 +99,14 @@ DISCComplationResult Compile(mlir::ModuleOp &module, | |||
res.ral_mate_pb = ReadFileBytes(absl::StrCat(output_fname, ".pbtxt")); | |||
res.inputs = inputs; | |||
res.outputs = outputs; | |||
|
|||
DISCCompileResult result; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove this redundant code.
@@ -405,6 +407,71 @@ size_t DISCComputationClient::GetNumDevices() const { return world_size_; } | |||
int DISCComputationClient::GetProcessIndex() const { return local_rank_; } | |||
|
|||
int DISCComputationClient::GetNumProcesses() const { return world_size_; } | |||
std::string DISCComputationClient::SerializeComputation( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add some blank lines between functions.
f22e15d
to
9913ef0
Compare
Support compilation result Serialize and Deserialize.